package com.itlong.cloud.POJO.PO;

import com.itlong.cloud.annotation.ItlField;
import com.itlong.cloud.annotation.ItlTables;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <desc>
 *    单元信息
 * </desc>
 *
 * @createDate 2017--19 11:51
 */
@ItlTables("unit_info")
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class UnitInfoPO extends  BasePO implements Serializable{
    @ItlField(value = "unit_id",logicKey = "key")
    private String unitId; //单元ID

    @ItlField("unit_num")
    private  String unitNum; //单元编号，2位，01-09

    @ItlField("build_id")
    private String buildId; //楼栋ID

    @ItlField("project_id")
    private String projectId; //项目编号

    @ItlField("unit_alias")
    private  String unitAlias; //单元代号（单元编码，项目内唯一，默认由buildNum + unitNum生成，支持用户自定义）

    @ItlField("unit_name")
    private  String unitName; //单元名称

    @ItlField("unit_group_num")
    private String unitGroupNum; // 单元权限组号，01-99，小区内唯一

//    @ItlField("build_name")
//    private  String buildName; //楼栋名称
//
//    @ItlField("room_count")
//    private  Integer roomCount; //房间数


    public UnitInfoPO(String projectId, String buildId, String unitId, String unitNum, String unitName, String unitAlias) {
        this.unitId = unitId;
        this.unitNum = unitNum;
        this.buildId = buildId;
        this.projectId = projectId;
        this.unitAlias = unitAlias;
        this.unitName = unitName;
    }
}
